import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/login_property_entity.dart';

LoginPropertyEntity $LoginPropertyEntityFromJson(Map<String, dynamic> json) {
	final LoginPropertyEntity loginPropertyEntity = LoginPropertyEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		loginPropertyEntity.code = code;
	}
	final LoginPropertyObj? obj = jsonConvert.convert<LoginPropertyObj>(json['obj']);
	if (obj != null) {
		loginPropertyEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		loginPropertyEntity.msg = msg;
	}
	return loginPropertyEntity;
}

Map<String, dynamic> $LoginPropertyEntityToJson(LoginPropertyEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

LoginPropertyObj $LoginPropertyObjFromJson(Map<String, dynamic> json) {
	final LoginPropertyObj loginPropertyObj = LoginPropertyObj();
	final String? username = jsonConvert.convert<String>(json['username']);
	if (username != null) {
		loginPropertyObj.username = username;
	}
	final String? headPortrait = jsonConvert.convert<String>(json['headPortrait']);
	if (headPortrait != null) {
		loginPropertyObj.headPortrait = headPortrait;
	}
	final String? accessToken = jsonConvert.convert<String>(json['accessToken']);
	if (accessToken != null) {
		loginPropertyObj.accessToken = accessToken;
	}
	final int? cid = jsonConvert.convert<int>(json['cid']);
	if (cid != null) {
		loginPropertyObj.cid = cid;
	}
	final String? cname = jsonConvert.convert<String>(json['cname']);
	if (cname != null) {
		loginPropertyObj.cname = cname;
	}
	final int? uid = jsonConvert.convert<int>(json['uid']);
	if (uid != null) {
		loginPropertyObj.uid = uid;
	}
	final String? relation = jsonConvert.convert<String>(json['relation']);
	if (relation != null) {
		loginPropertyObj.relation = relation;
	}
	return loginPropertyObj;
}

Map<String, dynamic> $LoginPropertyObjToJson(LoginPropertyObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['username'] = entity.username;
	data['headPortrait'] = entity.headPortrait;
	data['accessToken'] = entity.accessToken;
	data['cid'] = entity.cid;
	data['cname'] = entity.cname;
	data['uid'] = entity.uid;
	data['relation'] = entity.relation;
	return data;
}